package com.service.component.log.services.Impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.service.component.log.entity.SysOperate;
import com.service.component.log.mapper.SysOperateMapper;
import com.service.component.log.services.SysOperateService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Slf4j
@Service
/**
 * @author ：Calvin
 * @date ：Created in 2021/7/16 14:35
 * @description：操作日志Service
 * @modified By：
 * @version: 1.0.0$
 */
public class SysOperateServiceImpl implements SysOperateService {

    @Autowired
    private SysOperateMapper sysOperateMapper;

    @Override
    public Integer insert(SysOperate sysOperate) {
        return sysOperateMapper.insert(sysOperate);
    }

    @Override
    public List<SysOperate> selectSyslog(SysOperate sysOperate) {
        return sysOperateMapper.selectList(new QueryWrapper<>(sysOperate));
    }

    @Override
    public Integer updateSyslog(SysOperate sysOperate) {
        return sysOperateMapper.update(sysOperate,new QueryWrapper<>(sysOperate));
    }
}
